{% extends "./base.html" %}

{% block title %}
    {% if tag %}
    标签页：{{ tag.name }}
    {% elif category %}
    分类页：{{ category.name }}
    {% endif %}
{% endblock %}

{% block main %}
    <ul>
    {% for post in post_list %}
    <li>
        <!--a href="/post/{{ post.id }}.html">{{ post.title }}</a-->
        <a href=" {% url 'post-detail' post.id %} ">{{ post.title }}</a>
        <div>
            <span>作者：{{ post.owner.username }}</span>
            <span>分类：{{ post.category.name }}</span>
        </div>
        <p>{{ post.desc }}</p>
    </li>
    {% endfor %}
    </ul>
{% endblock %}